<template>
  <div>
    <el-table
        ref="singleTable"
        :border="true"
        :data="list"
        highlight-current-row
        show-summary
        style="width: 100%"
    >
      <el-table-column label="序号" sortable type="index" width="50">
        <el-table-column v-for="(item,index) in data" :key="index">
          <template>

          </template>
        </el-table-column>
      </el-table-column>
      <el-table-column label="活动名称" sortable>
        <template slot-scope="scope">
          <span
              style="color: #00a0e9; cursor: pointer"
              @click="handleGetActivityInfo(scope.row.activityId)"
          >
            {{ scope.row.activityName }}</span
          >
        </template>
      </el-table-column>
      <el-table-column
          label="活动内容"
          prop="activityName"
          sortable
      ></el-table-column>
      <el-table-column
          label="拟招人数"
          prop="activityRecruitPeople"
          sortable
          width="50"
      ></el-table-column>
      <el-table-column
          label="已招人数"
          prop="activityRecruitedPeople"
          sortable
          width="50"
      ></el-table-column>
      <el-table-column
          label="活动积分"
          prop="activityRecruitedPeople"
          sortable
          width="50"
      ></el-table-column>
      <el-table-column
          :filter-method="filterCharge"
          :filters="[
          { text: '否', value: 0 },
          { text: '是', value: 1 },
        ]"
          label="是否收费"
          prop="activityMoney"
          sortable
          width="100"
      >
        <template slot-scope="scope">
          <!--          直接使用钱数量判断是否收费，也可以使用filter 进行过滤-->
          <span>{{ scope.row.activityMoney | isChargeFree }}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" width="100">
        <template slot-scope="scope">
          <el-button
              size="mini"
              type="success"
              @click="handleGoaddArticle(scope.row)"
          >
            活动简报
          </el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
  props: {
    list: {
      default () {
        reutrn;
        {

        }
      },
    },
  },
};
</script>
